﻿using System;
using SharpSqlAnalyzer.nodes;
using SharpSqlAnalyzer.nodes.teradata;

namespace SharpSqlAnalyzer.stmt.teradata
{
	// Token: 0x020000D8 RID: 216
	public class TTeradataLock : TCustomSqlStatement
	{
		// Token: 0x17000161 RID: 353
		// (get) Token: 0x06000790 RID: 1936 RVA: 0x00300DB8 File Offset: 0x002FEFB8
		public virtual TSourceToken Database_table_view
		{
			get
			{
				return this.database_table_view;
			}
		}

		// Token: 0x17000162 RID: 354
		// (get) Token: 0x06000791 RID: 1937 RVA: 0x00300DC0 File Offset: 0x002FEFC0
		public virtual TSourceToken LockMode
		{
			get
			{
				return this.lockMode;
			}
		}

		// Token: 0x17000163 RID: 355
		// (get) Token: 0x06000792 RID: 1938 RVA: 0x00300DC8 File Offset: 0x002FEFC8
		// (set) Token: 0x06000793 RID: 1939 RVA: 0x00300DD0 File Offset: 0x002FEFD0
		public virtual TObjectName ObjectName
		{
			get
			{
				return this.objectName;
			}
			set
			{
				this.objectName = value;
			}
		}

		// Token: 0x17000164 RID: 356
		// (get) Token: 0x06000794 RID: 1940 RVA: 0x00300DD9 File Offset: 0x002FEFD9
		// (set) Token: 0x06000795 RID: 1941 RVA: 0x00300DE1 File Offset: 0x002FEFE1
		public virtual TCustomSqlStatement SqlRequest
		{
			get
			{
				return this.sqlRequest;
			}
			set
			{
				this.sqlRequest = value;
			}
		}

		// Token: 0x06000796 RID: 1942 RVA: 0x00300DEA File Offset: 0x002FEFEA
		public TTeradataLock(EDbVendor dbvendor) : base(dbvendor)
		{
			this.sqlstatementtype = ESqlStatementType.sstteradatalock;
		}

		// Token: 0x06000797 RID: 1943 RVA: 0x00300E00 File Offset: 0x002FF000
		public override int doParseStatement(TCustomSqlStatement psql)
		{
			if (this.rootNode == null)
			{
				return -1;
			}
			base.doParseStatement(psql);
			TTeradataLockSqlNode tteradataLockSqlNode = (TTeradataLockSqlNode)this.rootNode;
			if (tteradataLockSqlNode.StmtSqlNode != null)
			{
				tteradataLockSqlNode.StmtSqlNode.doParse(this, ESqlClause.unknown);
				this.sqlRequest = tteradataLockSqlNode.StmtSqlNode.Stmt;
			}
			this.database_table_view = tteradataLockSqlNode.LockClause.Database_table_view;
			this.lockMode = tteradataLockSqlNode.LockClause.LockMode;
			this.objectName = tteradataLockSqlNode.LockClause.ObjectName;
			return 0;
		}

		// Token: 0x06000798 RID: 1944 RVA: 0x00300E85 File Offset: 0x002FF085
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06000799 RID: 1945 RVA: 0x00300E95 File Offset: 0x002FF095
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.sqlRequest != null)
			{
				this.sqlRequest.accept(v);
			}
			v.postVisit(this);
		}

		// Token: 0x040011E7 RID: 4583
		private TSourceToken database_table_view;

		// Token: 0x040011E8 RID: 4584
		private TObjectName objectName;

		// Token: 0x040011E9 RID: 4585
		private TSourceToken lockMode;

		// Token: 0x040011EA RID: 4586
		private TCustomSqlStatement sqlRequest;
	}
}
